package com.jcli._java_swing_入门教程pdf.ch17;

import javax.swing.*;
import java.awt.*;

/**
 * @author li
 * @version 1.0
 * @belongsProject novel_20230923
 * @belongsPackage com.jcli._java_swing_入门教程pdf.ch17
 * @className JPanelDemo2
 * @description TODO  JPanel的案例转化
 * @createTime 2024-01-14  10:18
 */
public class JPanelDemo2 extends JFrame {
    public JPanelDemo2() {
        setTitle("第二个Java的GUI程序改版");
        setBounds(200,60,400,400);
        JPanel pl = new JPanel();
        pl.setBackground(Color.RED);
        JLabel jl = new JLabel("白起的标签");
        pl.add(jl);
        add(pl);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setVisible(true);
    }

    public static void main(String[] args) {
        new JPanelDemo2();
    }
}
